package cn.crm.controller;

import cn.crm.pojo.Customer;
import cn.crm.service.CustomerService;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.annotation.Resource;
import java.util.List;

@Controller
public class CustomerController {
    @Resource
    private CustomerService customerService;
    @RequestMapping("/customer")
    public String clist(Model model){
        List<Customer> list=customerService.find();
        model.addAttribute("list",list);
        return "index";
    }
}
